<h1><?=$this->translate->_('header_mod_posts')?></h1>

<?if($this->count > 0):?>
	<form method="post" action="<?=$this->url(array('module' => 'backend', 'controller' => 'posts', 'action' => 'request'), 'default', true)?>">
		<table summary="posts">
		<tr>
			<th><?=$this->translate->_('moderation_posts_thread')?></th>
			<th><?=$this->translate->_('moderation_posts_author')?></th>
			<th><?=$this->translate->_('moderation_posts_date')?></th>
			<th><input type="checkbox" onclick="checkAll(this.form); return false;" /></th>
		</tr>
		<?foreach($this->result AS $result):?>
		<tr>
			<td><a href="<?=$this->url(array('controller' => 'posts', 'uid' => $result['thread_uid'], 'title' => str_replace(' ', '_', $this->getThreadTitle($result['thread_uid']))), 'threads', true);?>"><?=$this->escape($this->getThreadTitle($result['thread_uid']))?></a></td>
			<td><?=$this->getAuthor($result['user_uid'])?></td>
			<td><?=$this->datetime($result['create_date'])?></td>
			<td><input type="checkbox" id="<?=$result['uid']?>" name="moderate[<?=$result['uid']?>]" value="1" /></td>
		</tr>
		<tr>
			<td colspan="4" style="font-size:0.8em; background-color:white;"><?=nl2br($this->BBCode($this->escape($result['text'], null, 'utf-8'), 0))?></td>
		</tr>
		<?endforeach;?>
		</table>
		
		<p class="right">
			<?=$this->translate->_('moderation_posts_select')?> 
			<select name="do">
				<option value="public"><?=$this->translate->_('moderation_posts_select_public')?></option>
				<option value="delete"><?=$this->translate->_('moderation_posts_select_delete')?></option>
			</select>
		</p>
		<p><input type="submit" value="<?=$this->translate->_('form_submit')?>" /></p>
	</form>
<?else:?>
	<p class="notice"><?=$this->translate->_('moderation_posts_error')?></p>
<?endif;?>